package com.bsbm.mappers;

import com.bsbm.common.domain.Address;
import com.bsbm.common.bean.AddressBean;

/**
 * Created with IntelliJ IDEA.
 * User: SABIR IQBAL
 * Date: 1/6/14
 * Time: 11:12 PM
 * To change this template use File | Settings | File Templates.
 */
public class AddressMapper {
    public static Address getDomainFromBean(AddressBean bean){
        Address domain = new Address();
        domain.setId(bean.getId());
        domain.setZip(bean.getZip());
        //domain.setState(bean.getState());
        //domain.setCountry(bean.getCountry());
        domain.setAddressLine1(bean.getAddressLine1());
        domain.setAddressLine2(bean.getAddressLine2());
        //domain.setCity(bean.getCity());
        return domain;
    }

    public static AddressBean getBeanFromDomain(Address domain){
        AddressBean bean = new AddressBean();
        bean.setId(domain.getId());
        bean.setZip(domain.getZip());
        //bean.setState(domain.getState());
        //bean.setCountry(domain.getCountry());
        bean.setAddressLine1(domain.getAddressLine1());
        bean.setAddressLine2(domain.getAddressLine2());
        //bean.setCity(domain.getCity());
        return bean;
    }

}
